import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String A = sc.nextLine();
        String B = sc.nextLine();
        boolean equal = true;
        StringBuffer C = new StringBuffer();
        for (int i = 0; i < A.length(); i++) {
            for (int j = 0; j < B.length(); j++) {
                if(A.charAt(i) == B.charAt(j)) {
                    equal  = false;
                }
            }
            if(equal) {
                C.append(A.charAt(i));
            }
            equal = true;
        }
        System.out.println(C);
    }
}
